/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2012
 */

package com.cmsky.rapid.model;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import com.cmsky.open.core.base.*;
import com.cmsky.open.core.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.cmsky.rapid.model.*;
import com.cmsky.rapid.dao.*;
import com.cmsky.rapid.service.*;
import com.cmsky.rapid.vo.query.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


public class CmsPropertyDetail extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "CmsPropertyDetail";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_PID = "propertyId";
	public static final String ALIAS_NID = "nodeId";
	public static final String ALIAS_CONTENT = "内容";
	
	//date formats
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * id       db_column: id 
     */	
	
	private java.lang.Integer id;
    /**
     * propertyId       db_column: pid 
     */	
	@NotNull 
	private java.lang.Integer pid;
    /**
     * nodeId       db_column: nid 
     */	
	@NotNull 
	private java.lang.Integer nid;
    /**
     * 内容       db_column: content 
     */	
	@NotBlank @Length(max=100)
	private java.lang.String content;
	//columns END

	public CmsPropertyDetail(){
	}

	public CmsPropertyDetail(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setPid(java.lang.Integer value) {
		this.pid = value;
	}
	
	public java.lang.Integer getPid() {
		return this.pid;
	}
	public void setNid(java.lang.Integer value) {
		this.nid = value;
	}
	
	public java.lang.Integer getNid() {
		return this.nid;
	}
	public void setContent(java.lang.String value) {
		this.content = value;
	}
	
	public java.lang.String getContent() {
		return this.content;
	}
	
	private CmsProperty cmsProperty;
	
	public void setCmsProperty(CmsProperty cmsProperty){
		this.cmsProperty = cmsProperty;
	}
	
	public CmsProperty getCmsProperty() {
		return cmsProperty;
	}
	
	private CmsNode cmsNode;
	
	public void setCmsNode(CmsNode cmsNode){
		this.cmsNode = cmsNode;
	}
	
	public CmsNode getCmsNode() {
		return cmsNode;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("Pid",getPid())
			.append("Nid",getNid())
			.append("Content",getContent())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof CmsPropertyDetail == false) return false;
		if(this == obj) return true;
		CmsPropertyDetail other = (CmsPropertyDetail)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

